docs: add the Auto-fix API to the Gateway docs - #1150
Merged
Conversation
New API page with the request, config, response statuses, error codes, limits, pricing, and errors. A card on the Gateway introduction, a sidebar entry under APIs, a callout on the Reliability page, and a short Pricing note. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ankur-mittal95
marked this pull request as ready for review
September 10, 2026 10:03
abhithesys
reviewed
Sep 10, 2026
No "program" anywhere; one library input, taken from the CLI's spec file, with full examples including imports; no artifact limit line; pricing links to the Pricing page instead of stating the amount.
abhithesys
previously approved these changes
Sep 10, 2026
The production section now has two subsections: the Auto-fix API for applications that call the model themselves, and OpenUI Gateway. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review feedback: the page describes a standalone API. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The repair reads the conversation to keep what the user asked for, so the page has to say the field exists, what the limits are, and where the text goes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Review feedback on the conversation-context lines. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zahlekhan
reviewed
Sep 11, 2026
The page described a body of its own and the old `/v1/embed/auto-fix` path, which no longer exists. The name loses its dash too. The request is a chat completion whose last assistant turn carries the generation to fix, so the first example is the OpenAI SDK with a base URL of `/v1/autofix`. A plain fetch and a Python call follow. Streaming is listed as not supported. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ritvik-thesys
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Gateway is getting a standalone endpoint that repairs invalid OpenUI Lang without routing the request through generation (thesysdev/muse#599, thesysdev/coda#1024). Users who call a model directly need to find it from the Gateway docs and know what it takes, returns, and costs.
The endpoint ships with thesysdev/muse#599 and thesysdev/coda#1024. Merge this once those are deployed, so the page never describes something that does not answer.
What changes
gateway/api/auto-fix.mdx): endpoint, a complete example with the library spec import and the API key, the request fields, the threestatusvalues with a sample response for a fix and for a failed fix, the error codes with their meaning, limits, a pricing pointer, HTTP errors, and how calls appear in the console.Auto-fix APIunder APIs, after Conversations API.Wording follows the existing pages: short sentences, the reader's side of the screen, and the same section order as the other API pages. The existing pages were edited in place without reformatting, since they are not prettier-formatted.
Check before merging
🤖 Generated with Claude Code
Review round 1
Applied: no "program" anywhere (the API field is now
generationon both sides);openUIlibraryVersionandcustomActionsremoved,libraryis the one input and takesopenui.spec.jsonas the CLI writes it; full examples with imports; artifact limit line removed; "two attempts to fix the generation"; price stated only on the Pricing page.Review round 2
Renamed the API from Sanitize to Auto-fix: page
api/auto-fix.mdx, sidebar entry, card, callout, endpoint/v1/embed/auto-fix, console model nameopenui/auto-fix.Conversation context
The Auto-fix API page also documents the optional
messagesfield: the conversation that produced the generation, as{ role, content }turns, used only to understand intent. Limits: 20 turns and 8,000 characters in total, oldest turns dropped first. Both code examples pass it, and the 400 row covers it. Pairs with muse #601 and coda #1026. (Folded in from #1162.)Review round 3: the OpenAI chat shape, and the name loses its dash
The API is now the Autofix API, with no dash anywhere: the page is
gateway/api/autofix.mdx, the path is/v1/autofix, and the console model nameis
openui/autofix. Every link and mention underdocs/contentfollows.The request and the answer are an OpenAI chat completion, so the page was
rewritten around that:
POST https://api.thesys.dev/v1/autofixfor aplain HTTP call, and
https://api.thesys.dev/v1/autofix/chat/completions,which is where an OpenAI SDK posts when
/v1/autofixis its base URL. Samebody, same answer.
fix_summaryfield needs. A plainfetchexample and a Python examplefollow.
messagesfield beside ageneration:messagesis the request, and the generation is the lastassistant turn. The Request table says so, and the 400 row covers it.
choices[0].message.contentfor the generation,
fix_summaryforstatus,fixed_errorsandunfixed_errors.row.
Checked on the local docs server:
/docs/gateway/api/autofixrenders, and nopage under
docs/contentlinks toauto-fixany more.